package com.ysd.repository;



import javax.transaction.Transactional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import com.ysd.entity.Read_room;

public interface Read_roomRepository extends JpaRepository<Read_room, Integer>{
	@Query(value = "INSERT INTO read_roomtb (id,remark,zi_yuan_name)VALUES(null,null,?1)",nativeQuery = true)
	@Modifying
	@Transactional
	int insertRead(String name);
	@Query(value = "UPDATE read_roomtb SET zi_yuan_name=?1 WHERE id=?2",nativeQuery = true)
	@Modifying
	@Transactional
	int updateRead(String ziYuanName,int id);
}
